﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/index.Master" CodeBehind="ListUzivatelu.aspx.cs" Inherits="Fotobanka.ListUzivatelu" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Obsah" runat="server">
    <br />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" 
        CellPadding="4" ForeColor="#333333" GridLines="None" 
        onrowdatabound="GridView1_RowDataBound" DataKeyNames="Id" 
        ondatabinding="GridView1_DataBinding" onrowcommand="GridView1_RowCommand">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="FirstName" HeaderText="Jméno" 
                SortExpression="FirstName" />
            <asp:BoundField DataField="LastName" HeaderText="Příjmení" 
                SortExpression="LastName" />
            <asp:BoundField DataField="LastLogin" HeaderText="Poslední přihlášení" 
                SortExpression="LastLogin" />
            <asp:BoundField DataField="CreatedOn" HeaderText="Vytvořen" 
                SortExpression="CreatedOn" />
            <asp:BoundField DataField="Authorization" HeaderText="Autorizován" 
                SortExpression="Authorization" />
            <asp:BoundField DataField="GalleryAdmin" HeaderText="Spravcovství" 
                SortExpression="GalleryAdmin" />
            <asp:HyperLinkField DataNavigateUrlFields="Id" 
                DataNavigateUrlFormatString="EditovatUzivatele.aspx?id={0}" HeaderText="E" 
                NavigateUrl="EditovatUzivatele.aspx" Text="E" >
            <ItemStyle BorderColor="Black" BorderWidth="1px" />
            </asp:HyperLinkField>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                        CommandName="Admintrue" Text="Admin" CommandArgument='<%# Eval("Id") %>'></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    <br />
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        TypeName="Fotobanka.UserManager" SelectMethod="UserList" 
        DeleteMethod="DeleteFromDb">
        <DeleteParameters>
            <asp:ControlParameter ControlID="GridView1" Name="id" 
                PropertyName="SelectedValue" />
        </DeleteParameters>
    </asp:ObjectDataSource>
    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Ovladaci_panel" runat="server">
</asp:Content>
